#ifndef IFILE_H
# define IFILE_H

#include <string>

namespace PommedAPI
{
  class IFile
  {
  public:
    virtual ~IFile() {};

    virtual bool		doesExist() = 0;
    virtual bool		isFile() = 0;
    virtual bool		isDirectory() = 0;

    virtual int			createFile() = 0;
    virtual int			setFileContent(const std::string& content, bool append = true) = 0;
    virtual int			deleteFile() = 0;

    virtual std::string		getBlock() = 0;
    virtual bool		eof() = 0;

    virtual std::string		getContentType() = 0;
    virtual time_t		getLastModified() = 0;
    virtual off_t		getContentLength() = 0;

    static PommedAPI::IFile*	factory(const std::string& path);
  };
}

#endif /* IFILE_H */
